/** This is the simple implementation that creates a square and saves it as a .BMP file.
 */
#include "image.h"


int main(void)
{
Image Img;
unsigned x, y;
RGBQuad Color1, Color2;

  Color1.R = Color1.G = Color1.B = 0;
  Color2.R = Color2.G = Color2.B = 255;

  Img.AttachRaster(CreateRaster2DRGB(255,255,8));
  if(Img.Raster==NULL) return -1;

  for(y=0; y<Img.Raster->Size2D; y++)
    for(x=0; x<Img.Raster->Size1D; x++)
    {
      if(x>100 && y>100 && x<200 && y<200)
        Img.Raster->Set(x,y,&Color1);
      else
        Img.Raster->Set(x,y,&Color2);
    }

 return SavePicture("test.bmp",Img);
}